/**
	Object oriented interface for adding prototypes to built in objects.

	@usage
	To add all prototypes for this object:
	<code>
		timber.prototype.String.load();
	</code>

	To add a specific prototypes for this object:
	<code>
		timber.prototype.String.load('tween');
	</code>


	@author Chandler McWilliams
	@version 2005-12-27
*/
dynamic class timber.prototype.String
{
	private static var didInit = false;
	
	private function init() {
		timber.prototype.String.didInit = true;
		
		#include "includes/String.as"
	}
	
	public static function load(method) {
		// init by loading the prototypes locally
		if (!timber.prototype.String.didInit) {
			var self = new timber.prototype.String();
			self.init();
		}
		
		if (!method) {
			for (var p in self) {
				_global.String.prototype[p] = self[p];
			}
		} else {
			_global.String.prototype[method] = self[method];
		}
		
		
	}

}